import React from 'react'
import '../css/TabBar.css'

class TabBar extends React.Component {
    constructor(props) {
        super(props)
        console.log(this.props);
        this.state = {
            title: "",
            isShow: false
        }
    }

    componentWillMount = () => {
        this.setState({
            title: this.props.title
        })
    }



    render() {
        return (
            <div className="tab_bar_container">
                <div>
                    <button onClick={() => {
                        this.state.isShow = false
                   }}>返回</button>
                </div>
                <div>{this.state.title}</div>
                <div>
                    <button onClick={() => {
                        this.props.sendMessage("子传父")
                    }}>编辑</button>
                </div>
            </div>
        )
    }
}

export default TabBar